package com.kid.springcloud.handler;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.kid.springcloud.entity.Result;

/**
 * 处理java以及业务异常
 */
public class CustomGlobalFallBackHandler {
    public static Result fallbackMethod1(Throwable throwable){
        return Result.error("402","java异常1 num值异常 信息="+throwable.getMessage());
    }

    public static Result fallbackMethod2(Throwable throwable){
        return Result.error("403","java异常2 信息="+throwable.getMessage());
    }
}
